<script setup lang="ts">
import { ref } from "vue";
import { ConfigService } from "../bindings/app/service/index";
import { Events } from "@wailsio/runtime";
const t = ref("");
Events.On('time', (time) => {
  t.value = time.data;
});
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-CN';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import { useConfigStore } from './store/config'
import TitleBar from './components/TitleBar.vue'
// locale
const arcoLocales: any = {
  'zh': zhCN,
  'en': enUS,
};
// store
const store = useConfigStore()
const loadConfig = () => {
  ConfigService.Get().then((res: any) => {
    store.setConfig(res)
  })
}
loadConfig()
</script>

<template>
  <div class="w-screen h-screen fixed">
    <a-config-provider :locale="arcoLocales[store.locale]" size="small" :scroll-to-close="true">
      <TitleBar />
      <div class="body-h">
        body
      </div>
    </a-config-provider>
  </div>
</template>

<style scoped></style>
